<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-cn" xml:lang="zh-cn">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title><?=$title?> - 网站后台管理系统</title>
  <?=HTML::style ('styles/admin/stylesheet.css')?>
  <?=HTML::script('scripts/admin/jquery/jquery-1.7.2.min.js')?>
</head>

<body style="height:auto; margin:0;">
<div id="container" style="width:600px; margin:40px auto 0 auto;">
  <div class="box" style="margin:auto;">
    <div class="heading">
      <h1><img src="<?=URL::site()?>images/admin/<?=($type=='info')?'information':'error'?>.png" alt="" /> <?=$title?></h1>
    </div>
    <div class="content" style="min-height:inherit; padding:25px 15px;  text-align:center;"><?=$message?></div>
    <div style="margin-top:20px; font-size:14px;  text-align:center;">
      <? foreach ($links as $link) { ?>
          [ <a href="<?=$link['url']?>" title="<?=$link['text']?>" target="<?=$link['target']?>"><?=$link['text']?></a> ] &nbsp;
      <? } ?>
      [ <a href="javascript:history.back();">返回上一页</a> ]
    </div>
    <? if ($auto_redirect === TRUE) { ?><div style="margin-top: 20px; text-align:center; font-size: 12px; color: gray"><span id="wait_time"><?=$wait_time?></span> 秒钟后，页面将自动跳转前往 【<?=isset($links[0])?$links[0]['text']:'返回上一页'?>】</div><? } ?>
  </div>
</div>
</body>
</html>
<? if ($auto_redirect === TRUE) { ?>
<script type="text/javascript">
$().ready(function(){
    var timer;
    var timeout='10';

    function countdown() {
        if (timeout <= 0) {
            <? if (isset($links[0])) { ?>location = '<?=$links[0]['url']?>';<? } else { ?>history.back();<? } ?>
        }
        if (timeout > 0) {
          $('#wait_time').html(timeout);
          timer = setTimeout(countdown, 1000);
        }
        timeout--;
    }

    countdown();
});
</script>
<? } ?>